System and methods for live data migration

ABSTRACT

Systems and methods are provided for data migration. The system may comprise one or more processors and a memory storing instructions that, when executed by the one or more processors, cause the system to migrate at least one first table of a first database schema to at least one second table of a second database schema, determine a query for modifying the first table during the migration, modify the second table based at least in part on the query, and update a mutation table to describe the modification, wherein the mutation table at least describes the modification.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 15/720,766, filed Sep. 29, 2017, which is acontinuation of U.S. patent application Ser. No. 15/474,713, filed Mar.30, 2017, now U.S. Pat. No. 9,805,071, which claims the benefit under 35U.S.C. § 119(e) of U.S. Provisional Application No. 62/420,353 filedNov. 10, 2016, the content of each of which are incorporated byreference in their entirety into the present disclosure.

FIELD OF THE INVENTION

This disclosure relates to approaches for migrating live data.

BACKGROUND

Data migration refers to the process of transferring data betweenstorage types, formats, or computer systems. It is a key considerationfor any system implementation, upgrade, or consolidation. In a typicalexample, data is stored in tables of a database. Over time, for variousreasons, such as changes to the database schema, it may be necessary tomigrate the data from one or more tables of a first database to one ormore tables of a second database. For example, the migration may alsoinclude converting data from one schema to another schema. Forlarge-scale applications, the migration may take several hours to days.Due to commercial, practical, or other reasons, it may be unrealistic tobring the database system offline during the migration.

SUMMARY

Various embodiments of the present disclosure can include systems,methods, and non-transitory computer readable media configured to causeat least one first table of a first database schema to be migrated to atleast one second table of a second database schema; determine a queryfor modifying the first table during the migration; modify the secondtable based at least in part on the query; and update a mutation tableto describe the modification, wherein the mutation table at leastdescribes the modification.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine a second query for accessingthe at least one field during the migration; determine that the at leastone field has been modified based at least in part on the mutationtable; and provide data corresponding to the field from the second tablein response to the second query.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine a second query for accessingthe at least one field during the migration; determine that the at leastone field has not been modified based at least in part on the mutationtable; and provide data corresponding to the field from the first tablein response to the second query.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine at least one field to bemigrated from the first table to the second table; determine that nowrite operations have been performed to a row corresponding to the fieldduring the migration; and cause the field to be migrated from the firsttable to the second table.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine that no write operations wereperformed on the row based at least in part on the mutation table.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to cause data corresponding to the fieldin the first table to be populated in one or more fields of the secondtable based at least in part on a respective schema of the second table.

In some embodiments, modifying the first table includes at least one ofmodifying data, inserting data, or deleting data in the first table.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine a row in the second table towhich the modification was performed; and update the mutation table toindicate that the row has been modified.

In some embodiments, the mutation table is updated to indicate the rowwas modified by updating a Boolean value that corresponds to the row.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine a second query for accessingthe at least one row during the migration; determine that the at leastone row has been modified based at least in part on the mutation table;determine that the row has been deleted from the second table; andprovide a null value in response to the second query.

These and other features of the systems, methods, and non-transitorycomputer readable media disclosed herein, as well as the methods ofoperation and functions of the related elements of structure and thecombination of parts and economies of manufacture, will become moreapparent upon consideration of the following description and theappended claims with reference to the accompanying drawings, all ofwhich form a part of this specification, wherein like reference numeralsdesignate corresponding parts in the various figures. It is to beexpressly understood, however, that the drawings are for purposes ofillustration and description only and are not intended as a definitionof the limits of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Certain features of various embodiments of the present technology areset forth with particularity in the appended claims. A betterunderstanding of the features and advantages of the technology will beobtained by reference to the following detailed description that setsforth illustrative embodiments, in which the principles of the inventionare utilized, and the accompanying drawings of which:

FIG. 1 illustrates a block diagram of an example of a system forperforming live data migrations, according to embodiments of the presentdisclosure.

FIGS. 2A-B illustrate example database tables, according to embodimentsof the present disclosure.

FIG. 3 illustrates a block diagram of an example approach for performinglive data migrations, according to embodiments of the presentdisclosure.

FIG. 4 illustrates a block diagram of another example approach forperforming live data migrations, according to embodiments of the presentdisclosure.

FIG. 5 illustrates a block diagram of another example approach forperforming live data migrations, according to embodiments of the presentdisclosure.

FIG. 6 illustrates a flowchart of an example method for performing alive data migration, according to embodiments of the present disclosure.

FIG. 7 is a block diagram that illustrates a computer system upon whichany of the embodiments described herein may be implemented.

The figures depict various embodiments of the disclosed technology forpurposes of illustration only, wherein the figures use like referencenumerals to identify like elements. One skilled in the art will readilyrecognize from the following discussion that alternative embodiments ofthe structures and methods illustrated in the figures can be employedwithout departing from the principles of the disclosed technologydescribed herein.

DETAILED DESCRIPTION

Under conventional approaches, processing queries while migrating a livedatabase from one schema to another can pose several challenges. In oneexample, users may submit queries that add, modify, or delete datastored in the database tables being migrated. In this example, computingsystems tasked with processing such queries must be able to accuratelytrack changes to the data so that the most up-to-date version of thedata can be provided in response to any queries accessing the modifieddata.

A claimed solution rooted in computer technology overcomes problemsspecifically arising in the realm of computer technology. In variousimplementations, a computing system is configured to process read andwrite queries to a database while migrating tables in the database froman old schema to a new schema. For example, in some implementations, thesystem can maintain a mutation table that tracks any changes made tofields (e.g., rows, columns, or both) in the database tables during themigration. When a query for modifying a field in a database table isreceived, the system can modify the appropriate field in the databasetable that corresponds to the new schema. The system can also update themutation table to indicate the modification. When a query for accessingthe field is received, the system can determine whether the field wasmodified based on the mutation table. If the field was modified, thesystem returns data stored in the field from the database tablecorresponding to the new schema.

FIG. 1 illustrates a block diagram of an example of a system 100 forperforming live data migrations, according to embodiments of the presentdisclosure. The example system shown in FIG. 1 includes a computingsystem 10 and a computing device 30 that can communicate with oneanother over a network 20. The computing system 10 may be configured toimplement one or more of the various embodiments described herein.Depending on the implementation, the computing device 30 may be anycomputing device having one or more processors, e.g., a mobile device.The network 20 may include one or more computer networks (e.g., theInternet, local area networks, etc.) or other transmission mediums. Suchnetworks may be wired and/or wireless. The system 100 may include more,fewer, or alternative components than those shown in FIG. 1.

In various embodiments, the computing device 10 can be configured toprocess queries that are received from various computing devices, e.g.,the computing device 30. Such queries may involve requesting data thatis stored in one or more tables of a database, writing new data in theone or more tables of the database, modifying existing data in the oneor more tables of the database, and/or deleting existing data in the oneor more tables of the database. The computing device 10 can process suchqueries and provide data that is responsive to the queries. In someinstances, the computing device 30 may be running one or more softwareapplications 32 that have been configured to query data that is storedin a particular database, e.g., the database 114.

In various embodiments, a live migration of data from one database,e.g., the database 114, to another database, e.g., the database 116, mayinvolve transferring (or copying) data from one or more tables of thedatabase 114 to one or more tables of the database 116. In someinstances, one or more tables of the database 114 may be configured fora first schema while the corresponding tables in the database 116 may beconfigured for a second schema. In one example, FIG. 2A illustrates anexample table 22 in the database 114. The example table 22 includes aset of columns “First Name”, “Last Name”, “Street”, “City”, and “State”.FIG. 2B illustrates an example table 24 in the database 116. The exampletable 24 includes a fewer set of columns than the table 22 and includescolumns labeled “First Name”, “Last Name”, and “Address”. The tables 22and 24 are provided merely as examples and, naturally, any form of datacan be migrated from one database to another regardless of beingmigrated between the same schema or different schemas.

The term “database” may refer to any data structure for storing and/ororganizing data, including, but not limited to, relational databases(Oracle database, MySQL database, etc.), spreadsheets, XML files, andtext file, among others. In some embodiments, a database schema of adatabase system is its structure described in a formal languagesupported by the database management system. The term “schema” refers tothe organization of data as a blueprint of how the data is constructed(divided into database tables in the case of relational database).

In general, when performing a live migration, the data that wasavailable in the database from which data is being migrated, e.g., thedatabase 114, including any changes made to the data during themigration, should be remain accessible while the migration is process.Such reliability is typically needed so that existing applications 32(or resources) that rely on the data can continue to operate until theapplications 32 have been modified or upgraded to utilize the database(e.g., database schema) to which the data is being migrated, e.g. thedatabase 116. In various embodiments, the computing system 10 (oranother computing system) is configured to migrate live data, forexample, from one or more first databases, e.g., the database 114, toone or more second databases, e.g., the database 116, withoutinterrupting the operations of existing applications 32 (or resources)that rely on the data being migrated. In general, such migration mayinvolve transferring (e.g., copying, moving, etc.) data stored in one ormore tables in the database 114 to one or more corresponding tables inthe database 116. Various approaches discussed below allow forperforming a live migration of data in such computing environments. Suchapproaches can be used to perform the live migration of data whileensuring that existing applications, or resources, that rely on the datacan continue to operate without interruption. Depending on theimplementation, the approaches may be used either alone or incombination.

FIG. 3 illustrates a block diagram of an example environment 310 forperforming live data migrations, according to embodiments of the presentdisclosure. FIG. 3 shows the computing system 10 and the computingdevice 30 as described in FIG. 1. As mentioned, the computing system 10and the computing device 30 can interact with one another over thenetwork 20. FIG. 3 also illustrates an example old table 12 in a firstdatabase, e.g., the database 114 of FIG. 1, and an example new table 14in a second database, e.g., the database 116 of FIG. 1. In this example,data from the old table 12 is being migrated to the new table 14.

FIG. 3 provides one example approach for migrating data from old table12 to new table 14 in a live production environment 310. As mentioned,the approaches described herein can be adapted to migrate data from theold table 12 to the new table 14 regardless of whether the tables 12 and14 have the same schema or different schemas. In this example, one ormore applications 32 (or resources) running on the computing device 30may submit queries to the computing system 10. These application(s) 32may be configured to query data from various database table(s) having afirst schema, e.g., the database 114 of FIG. 1. As mentioned, suchqueries may involve operations to access data from tables and/oroperations that write data to tables.

In various embodiments, to ensure that operation of the application(s)is not interrupted during the live migration, the computing system 10 istasked with processing the submitted queries using the most recent, orup-to-date, data. To do so, in some embodiments, the computing system 10utilizes a separate mutation table 513 to keep track of data to whichwrite operations have been performed during the migration. For example,in some embodiments, the mutation table is configured to track whether aparticular row has been modified during the migration. In one example,the mutation table 513 may store a row identifier (e.g., name, number,value, etc.) and a corresponding Boolean value indicating whether awrite operation has been performed on the row during the migration.

When performing the migration, in some embodiments, the computing system10 copies over each field in the old table 12 to the new table 14. Afield may be referenced by a row identifier and a column identifier, forexample. In such embodiments, when copying fields, the computing system10 can determine whether the row corresponding to the field waspreviously modified by any write operations that were performed duringthe migration. For example, the computing system 10 can reference themutation table 513 to determine whether the corresponding Boolean valuefor the row is true. In this example, a true value in the mutation table513 indicates that the row was modified. If the field was previouslymodified, then the field is not copied to the new table 14 so that anyup-to-date values already stored in the new table 14 are notoverwritten. Otherwise, if the field was not previously modified, thecomputing system 10 copies the field from the old table 12 to the newtable 14. As mentioned, the old table 12 and new table 14 may havedifferent schemas (e.g., different columns, etc.). Thus, in variousembodiments, the computing system 10 can determine the appropriatelocation in which the field being copied is to be stored, for example,based on a pre-defined mapping of columns between the different schemas.The computing system 10 can further be configured to parse the databeing migrated from one table, e.g., the table 12, to another table,e.g., the table 14 based on the different table schemas so that theparsed portions of the data are migrated, or populated, to theappropriate locations (e.g., fields, rows, columns, etc.) based on therespective schema of the table to which the data is being migrated.

In some embodiments, when a query for performing a write operation(e.g., modifying existing rows, deleting rows, etc.) to the old table 12is received, the computing system 10 is configured to perform the writeoperation on the new table 14. In one example, a query that modifies rown (e.g., n being some numerical value) in the old table 12 can beexecuted against the new table 14 so that row n in new table 14 ismodified instead of old table 12. In such embodiments, the computingsystem 10 can also update the mutation table 513 to indicate that row nwas modified during the migration, e.g., by setting the correspondingBoolean value for row n in the mutation table 513 to “true”. In suchembodiments, performing the write operations on the new table 14 allowsthe computing system 10 to store the most recent or up-to-date data inthe new table 14 to which data is being migrated which prevents loss ofdata during the live migration. In some instances, the write operationmay delete one or more rows from a table. In such instances, the row canbe deleted in the new table 14 to which the data is being migrated.Similarly, the mutation table 513 can be updated to reflect themodification (e.g., deletion) as described above. When a query foraccessing the deleted row is received, the computing system 10 candetermine that the row has been modified using the mutation table 513,for example. The computing system 10 can further determine that the rowis no longer present in the new table 14. In this example, the computingsystem 10 can provide a response (e.g., null value) indicating that therow is no longer available for access.

In some embodiments, when a query for performing a read operation isreceived (e.g., reading a row of data), the computing system 10 candetermine if the row being read was previously modified, for example,using the mutation table 513. For example, the computing system 10 canreference the mutation table 513 to determine whether the correspondingBoolean value for the row is true. In this example, a true value in themutation table 513 indicates that the row was modified. If the row waspreviously modified, then the computing system 10 provides datacorresponding to the row from the new table 14 to which data is beingmigrated. Otherwise, if the row has not been modified, then thecomputing system 10 provides data corresponding to the row from the oldtable 12 from which data is being migrated. Such coordination of readoperations allows the computing system 10 to process queries using themost recent or up-to-date data that is available in the live productionenvironment.

FIG. 4 illustrates a block diagram of an example environment 410 forperforming live data migrations, according to embodiments of the presentdisclosure. FIG. 4 shows the computing system 10 and the computingdevice 30 as described in FIG. 1. As mentioned, the computing system 10and the computing device 30 can interact with one another over thenetwork 20. FIG. 4 also illustrates an example old table 12 in a firstdatabase, e.g., the database 114 of FIG. 1, and an example new table 14in a second database, e.g., the database 116 of FIG. 1. In this example,data from the old table 12 is being migrated to the new table 14.

FIG. 4 provides another example approach for migrating data from oldtable 12 to new table 14 in a live production environment 310. Asmentioned, the approaches described herein can be adapted to migratedata from the old table 12 to the new table 14 regardless of whether thetables 12 and 14 have the same schema or different schemas. Asmentioned, in various embodiments, to ensure that operation of variousapplication(s) is not interrupted during the live migration, thecomputing system 10 is tasked with processing submitted queries usingthe most recent, or up-to-date, data. To do so, in some embodiments, thecomputing system 10 utilizes a separate mutation table 514 to keep trackof data to which write operations have been performed during themigration, as described above. In such embodiments, since the old table12 becomes immutable once the live migration starts, an end of themigration can be determined when all old rows of the old table 12 havebeen migrated. During the migration of the old table 12, one or moreupdates to the old table 12 may be recorded and logged chronologicallysuch that the updates can be applied after the migration according tothe chronological order. In some implementations, the computing system10 may utilize a separate diff table 524 to store data provided withwrite operations that were submitted from various client devices, e.g.,the computing device 30. In some embodiments, the diff table 524 has thesame schema as the new table 14 to which data is being migrated. Thecomputing device 10 can also utilize a commit log 534 that logs datadescribing the various rows to which write operations have beenperformed during the migration. In some embodiments, the commit log 534keeps a log of all rows to which write operations were performed inchronological order. In one example, the commit log 534 storesinformation identifying a row to which a write operation was performed(e.g., row identifier, name, number, value, etc.) along with acorresponding timestamp indicating when the write operation wasperformed.

In some embodiments, when a query for performing a write operation(e.g., modifying existing rows, deleting rows, etc.) to the old table 12is received, the computing system 10 is configured to perform the writeoperation on the diff table 524. In one example, a query that modifiesrow n (e.g., n being some numerical value) in the old table 12 can beexecuted against the diff table 524 so that row n in the diff table 524is modified instead of old table 12. In such embodiments, the computingsystem 10 can also update the mutation table 514 to indicate that row nwas modified during the migration, e.g., by setting the correspondingBoolean value for row n in the mutation table 514 to “true”. Further, insuch embodiments, the computing system 10 can also update the commit log534 to include information identifying the row to which the writeoperation was performed along with a corresponding timestamp indicatingwhen the write operation was performed.

When performing the migration, in some embodiments, the computing system10 migrates each field in the old table 12 to the new table 14. A fieldmay be referenced by a row identifier and a column identifier, forexample. For example, the computing system 10 can copy each field in theold table 12 to a corresponding field in the new table 14. The computingsystem 10 can then utilize the commit log 534 to migrate rows to whichwrite operations were performed. For example, for each row in the commitlog 534, the computing system 10 can chronologically apply the events inthe commit log 534 onto the new table 14.

In some embodiments, when a query for performing a read operation isreceived (e.g., reading a row of data), the computing system 10 candetermine if the row being read was previously modified, for example,using the mutation table 514. If the row was previously modified, thenthe computing system 10 provides data corresponding to the row from thediff table 524. Otherwise, if the row has not been modified, then thecomputing system 10 provides data corresponding to the row from the oldtable 12 from which data is being migrated.

FIG. 5 illustrates a block diagram of an example environment 510 forperforming live data migrations, according to embodiments of the presentdisclosure. FIG. 5 shows the computing system 10 and the computingdevice 30 as described in FIG. 1. As mentioned, the computing system 10and the computing device 30 can interact with one another over thenetwork 20. FIG. 5 also illustrates an example old table 12 in a firstdatabase, e.g., the database 114 of FIG. 1, and an example new table 14in a second database, e.g., the database 116 of FIG. 1. In this example,data from the old table 12 is being migrated to the new table 14.

FIG. 5 provides another example approach for migrating data from oldtable 12 to new table 14 in a live production environment 310. Asmentioned, the approaches described herein can be adapted to migratedata from the old table 12 to the new table 14 regardless of whether thetables 12 and 14 have the same schema or different schemas. Asmentioned, in various embodiments, to ensure that operation of variousapplication(s) is not interrupted during the live migration, thecomputing system 10 is tasked with processing submitted queries usingthe most recent, or up-to-date, data.

In some embodiments, when a query for performing a write operation(e.g., modifying existing rows, deleting rows, etc.) to the old table 12is received, the computing system 10 is configured to perform the writeoperation on the new table 14. In one example, a query that modifies rown (e.g., n being some numerical value) in the old table 12 can beexecuted against the new table 14 so that row n in the new table 14 ismodified. Further, in such embodiments, the computing system 10 can alsoupdate the old table 12 based on the write operation. In some instances,the schemas of old table 12 and new table 14 may differ. In suchinstances, data included in any new columns in the new table 14 may beomitted from the old table 12.

In the example of FIG. 5, the computing system 10 can perform themigration without relying on any tables (or logs). For example, whenmigrating a field from the old table 12 to the new table 14, in someembodiments, the computing system 10 determines whether the rowcorresponding to the field already exists in the new table 14. If therow does not exist in the new table 14, the computing system 10 migratesthe field to the new table 14.

In some embodiments, when a query for performing a read operation isreceived (e.g., reading a row of data), the computing system 10 providesthe requested data (e.g., row) from the old table 12.

FIG. 6 illustrates a flowchart of an example method 610 for live datamigration, according to various embodiments of the present disclosure.The method 610 may be implemented in various environments including, forexample, the environment 310 of FIG. 3. The operations of method 610presented below are intended to be illustrative. Depending on theimplementation, the example method 610 may include additional, fewer, oralternative steps performed in various orders or in parallel. Theexample method 600 may be implemented in various computing systems ordevices including one or more processors.

At block 621, at least one first table of a first database schema ismigrated to at least one second table of a second database schema. Atblock 622, a determination is made of a query for modifying the firsttable during the migration. At block 623, the second table is modifiedbased at least in part on the query. At block 624, the mutation table isupdated to describe the modification, wherein the mutation table atleast describes the modification.

Hardware Implementation

The techniques described herein are implemented by one or morespecial-purpose computing devices. The special-purpose computing devicesmay be hard-wired to perform the techniques, or may include circuitry ordigital electronic devices such as one or more application-specificintegrated circuits (ASICs) or field programmable gate arrays (FPGAs)that are persistently programmed to perform the techniques, or mayinclude one or more hardware processors programmed to perform thetechniques pursuant to program instructions in firmware, memory, otherstorage, or a combination. Such special-purpose computing devices mayalso combine custom hard-wired logic, ASICs, or FPGAs with customprogramming to accomplish the techniques. The special-purpose computingdevices may be desktop computer systems, server computer systems,portable computer systems, handheld devices, networking devices or anyother device or combination of devices that incorporate hard-wiredand/or program logic to implement the techniques.

Computing device(s) are generally controlled and coordinated byoperating system software, such as iOS, Android, Chrome OS, Windows XP,Windows Vista, Windows 7, Windows 8, Windows Server, Windows CE, Unix,Linux, SunOS, Solaris, iOS, Blackberry OS, VxWorks, or other compatibleoperating systems. In other embodiments, the computing device may becontrolled by a proprietary operating system. Conventional operatingsystems control and schedule computer processes for execution, performmemory management, provide file system, networking, I/O services, andprovide a user interface functionality, such as a graphical userinterface (“GUI”), among other things.

FIG. 7 is a block diagram that illustrates a computer system 700 uponwhich any of the embodiments described herein may be implemented. Thecomputer system 700 includes a bus 702 or other communication mechanismfor communicating information, one or more hardware processors 704coupled with bus 702 for processing information. Hardware processor(s)704 may be, for example, one or more general purpose microprocessors.

The computer system 700 also includes a main memory 706, such as arandom access memory (RAM), cache and/or other dynamic storage devices,coupled to bus 702 for storing information and instructions to beexecuted by processor 704. Main memory 706 also may be used for storingtemporary variables or other intermediate information during executionof instructions to be executed by processor 704. Such instructions, whenstored in storage media accessible to processor 704, render computersystem 700 into a special-purpose machine that is customized to performthe operations specified in the instructions.

The computer system 700 further includes a read only memory (ROM) 708 orother static storage device coupled to bus 702 for storing staticinformation and instructions for processor 704. A storage device 710,such as a magnetic disk, optical disk, or USB thumb drive (Flash drive),etc., is provided and coupled to bus 702 for storing information andinstructions.

The computer system 700 may be coupled via bus 702 to a display 712,such as a cathode ray tube (CRT) or LCD display (or touch screen), fordisplaying information to a computer user. An input device 714,including alphanumeric and other keys, is coupled to bus 702 forcommunicating information and command selections to processor 704.Another type of user input device is cursor control 716, such as amouse, a trackball, or cursor direction keys for communicating directioninformation and command selections to processor 704 and for controllingcursor movement on display 712. This input device typically has twodegrees of freedom in two axes, a first axis (e.g., x) and a second axis(e.g., y), that allows the device to specify positions in a plane. Insome embodiments, the same direction information and command selectionsas cursor control may be implemented via receiving touches on a touchscreen without a cursor.

The computing system 700 may include a user interface module toimplement a GUI that may be stored in a mass storage device asexecutable software codes that are executed by the computing device(s).This and other modules may include, by way of example, components, suchas software components, object-oriented software components, classcomponents and task components, processes, functions, attributes,procedures, subroutines, segments of program code, drivers, firmware,microcode, circuitry, data, databases, data structures, tables, arrays,and variables.

In general, the word “module,” as used herein, refers to logic embodiedin hardware or firmware, or to a collection of software instructions,possibly having entry and exit points, written in a programminglanguage, such as, for example, Java, C or C++. A software module may becompiled and linked into an executable program, installed in a dynamiclink library, or may be written in an interpreted programming languagesuch as, for example, BASIC, Perl, or Python. It will be appreciatedthat software modules may be callable from other modules or fromthemselves, and/or may be invoked in response to detected events orinterrupts. Software modules configured for execution on computingdevices may be provided on a computer readable medium, such as a compactdisc, digital video disc, flash drive, magnetic disc, or any othertangible medium, or as a digital download (and may be originally storedin a compressed or installable format that requires installation,decompression or decryption prior to execution). Such software code maybe stored, partially or fully, on a memory device of the executingcomputing device, for execution by the computing device. Softwareinstructions may be embedded in firmware, such as an EPROM. It will befurther appreciated that hardware modules may be comprised of connectedlogic units, such as gates and flip-flops, and/or may be comprised ofprogrammable units, such as programmable gate arrays or processors. Themodules or computing device functionality described herein arepreferably implemented as software modules, but may be represented inhardware or firmware. Generally, the modules described herein refer tological modules that may be combined with other modules or divided intosub-modules despite their physical organization or storage.

The computer system 700 may implement the techniques described hereinusing customized hard-wired logic, one or more ASICs or FPGAs, firmwareand/or program logic which in combination with the computer systemcauses or programs computer system 700 to be a special-purpose machine.According to one embodiment, the techniques herein are performed bycomputer system 700 in response to processor(s) 704 executing one ormore sequences of one or more instructions contained in main memory 706.Such instructions may be read into main memory 706 from another storagemedium, such as storage device 710. Execution of the sequences ofinstructions contained in main memory 706 causes processor(s) 704 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “non-transitory media,” and similar terms, as used hereinrefers to any media that store data and/or instructions that cause amachine to operate in a specific fashion. Such non-transitory media maycomprise non-volatile media and/or volatile media. Non-volatile mediaincludes, for example, optical or magnetic disks, such as storage device710. Volatile media includes dynamic memory, such as main memory 706.Common forms of non-transitory media include, for example, a floppydisk, a flexible disk, hard disk, solid state drive, magnetic tape, orany other magnetic data storage medium, a CD-ROM, any other optical datastorage medium, any physical medium with patterns of holes, a RAM, aPROM, and EPROM, a FLASH-EPROM, NVRAM, any other memory chip orcartridge, and networked versions of the same.

Non-transitory media is distinct from but may be used in conjunctionwith transmission media. Transmission media participates in transferringinformation between non-transitory media. For example, transmissionmedia includes coaxial cables, copper wire and fiber optics, includingthe wires that comprise bus 702. Transmission media can also take theform of acoustic or light waves, such as those generated duringradio-wave and infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 704 for execution. For example,the instructions may initially be carried on a magnetic disk or solidstate drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 700 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 702. Bus 702 carries the data tomain memory 706, from which processor 704 retrieves and executes theinstructions. The instructions received by main memory 706 may retrievesand executes the instructions. The instructions received by main memory706 may optionally be stored on storage device 710 either before orafter execution by processor 704.

The computer system 700 also includes a communication interface 718coupled to bus 702. Communication interface 718 provides a two-way datacommunication coupling to one or more network links that are connectedto one or more local networks. For example, communication interface 718may be an integrated services digital network (ISDN) card, cable modem,satellite modem, or a modem to provide a data communication connectionto a corresponding type of telephone line. As another example,communication interface 718 may be a local area network (LAN) card toprovide a data communication connection to a compatible LAN (or WANcomponent to communicated with a WAN). Wireless links may also beimplemented. In any such implementation, communication interface 718sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

A network link typically provides data communication through one or morenetworks to other data devices. For example, a network link may providea connection through local network to a host computer or to dataequipment operated by an Internet Service Provider (ISP). The ISP inturn provides data communication services through the world wide packetdata communication network now commonly referred to as the “Internet”.Local network and Internet both use electrical, electromagnetic oroptical signals that carry digital data streams. The signals through thevarious networks and the signals on network link and throughcommunication interface 718, which carry the digital data to and fromcomputer system 700, are example forms of transmission media.

The computer system 700 can send messages and receive data, includingprogram code, through the network(s), network link and communicationinterface 718. In the Internet example, a server might transmit arequested code for an application program through the Internet, the ISP,the local network and the communication interface 718.

The received code may be executed by processor 704 as it is received,and/or stored in storage device 710, or other non-volatile storage forlater execution.

Each of the processes, methods, and algorithms described in thepreceding sections may be embodied in, and fully or partially automatedby, code modules executed by one or more computer systems or computerprocessors comprising computer hardware. The processes and algorithmsmay be implemented partially or wholly in application-specificcircuitry.

The various features and processes described above may be usedindependently of one another, or may be combined in various ways. Allpossible combinations and sub-combinations are intended to fall withinthe scope of this disclosure. In addition, certain method or processblocks may be omitted in some implementations. The methods and processesdescribed herein are also not limited to any particular sequence, andthe blocks or states relating thereto can be performed in othersequences that are appropriate. For example, described blocks or statesmay be performed in an order other than that specifically disclosed, ormultiple blocks or states may be combined in a single block or state.The example blocks or states may be performed in serial, in parallel, orin some other manner. Blocks or states may be added to or removed fromthe disclosed example embodiments. The example systems and componentsdescribed herein may be configured differently than described. Forexample, elements may be added to, removed from, or rearranged comparedto the disclosed example embodiments.

Conditional language, such as, among others, “can,” “could,” “might,” or“may,” unless specifically stated otherwise, or otherwise understoodwithin the context as used, is generally intended to convey that certainembodiments include, while other embodiments do not include, certainfeatures, elements and/or steps. Thus, such conditional language is notgenerally intended to imply that features, elements and/or steps are inany way required for one or more embodiments or that one or moreembodiments necessarily include logic for deciding, with or without userinput or prompting, whether these features, elements and/or steps areincluded or are to be performed in any particular embodiment.

Any process descriptions, elements, or blocks in the flow diagramsdescribed herein and/or depicted in the attached figures should beunderstood as potentially representing modules, segments, or portions ofcode which include one or more executable instructions for implementingspecific logical functions or steps in the process. Alternateimplementations are included within the scope of the embodimentsdescribed herein in which elements or functions may be deleted, executedout of order from that shown or discussed, including substantiallyconcurrently or in reverse order, depending on the functionalityinvolved, as would be understood by those skilled in the art.

It should be emphasized that many variations and modifications may bemade to the above-described embodiments, the elements of which are to beunderstood as being among other acceptable examples. All suchmodifications and variations are intended to be included herein withinthe scope of this disclosure. The foregoing description details certainembodiments of the invention. It will be appreciated, however, that nomatter how detailed the foregoing appears in text, the invention can bepracticed in many ways. As is also stated above, it should be noted thatthe use of particular terminology when describing certain features oraspects of the invention should not be taken to imply that theterminology is being re-defined herein to be restricted to including anyspecific characteristics of the features or aspects of the inventionwith which that terminology is associated. The scope of the inventionshould therefore be construed in accordance with the appended claims andany equivalents thereof.

What is claimed is:
 1. A system for live data migration, the systemcomprising: one or more processors; and memory storing instructionsthat, when executed by the one or more processors, cause the system toperform: receiving a first query requesting a modification of at leastone field in the first table of a first database schema during a livemigration of the first table to a second table of a second databaseschema, the first table storing live data; modifying, in response toreceiving the first query, at least one corresponding field of thesecond table based on the first query; updating a mutation table basedon the modification, wherein the mutation table tracks one or moremodifications to the second table; receiving a second query foraccessing the at least one field in the first table during the livemigration of the first table to the second table of the second databaseschema; and determining, in response to receiving the second query andbased on the mutation table, the corresponding field of the second tablehas been modified; providing, based on the determination thecorresponding field of the second table has been modified, data from theat least one corresponding field of the second table in response to thesecond query.
 2. The system of claim 1, wherein the instructions furthercause the system to perform: receiving a third query for accessing atleast one other field of the first table during the live migration ofthe first table to the second table of the second database schema;determining, in response to receiving the third query and based on themutation table, at least one corresponding other field of the secondtable has not been modified; and providing, based on the determinationthe corresponding field of the second table has not been modified, datafrom the at least one field of the first table in response to the thirdquery.
 3. The system of claim 1, wherein the first table becomesimmutable during the live migration.
 4. The system of claim 1, whereinmodifying the first table includes at least one of modifying data,inserting data, or deleting data in the first table.
 5. The system ofclaim 1, wherein updating the mutation table further comprises:determining a row in the second table to which the modification wasperformed; and updating the mutation table to indicate that the row hasbeen modified.
 6. The system of claim 1, wherein the mutation tableindicates the requested modification of the first table by setting aBoolean value for a row of the mutation table corresponding to the firstrow the first table.
 7. The system of claim 1, wherein the first queryrequests to delete at least one row in the first table, wherein theinstructions further cause the system to perform: receiving a thirdquery for accessing the at least one row during the live migration ofthe first table to the second table of the second database schema;determining, in response to receiving the second query and based on themutation table, at least one corresponding row of the second table hasbeen deleted; determining that the row has been deleted from the secondtable; and providing a null value in response to the third query.
 8. Acomputer-implemented method, the method being implemented by a computingsystem including one or more processors and storage media storingmachine-readable instructions, the method comprising: receiving a firstquery requesting a modification of at least one field in the first tableof a first database schema during a live migration of the first table toa second table of a second database schema, the first table storing livedata; modifying, in response to receiving the first query, at least onecorresponding field of the second table based on the first query;updating a mutation table based on the modification, wherein themutation table tracks one or more modifications to the second table;receiving a second query for accessing the at least one field in thefirst table during the live migration of the first table to the secondtable of the second database schema; and determining, in response toreceiving the second query and based on the mutation table, thecorresponding field of the second table has been modified; providing,based on the determination the corresponding field of the second tablehas been modified, data from the at least one corresponding field of thesecond table in response to the second query.
 9. Thecomputer-implemented method of claim 8, wherein the instructions furthercause the system to perform: receiving a third query for accessing atleast one other field of the first table during the live migration ofthe first table to the second table of the second database schema;determining, in response to receiving the third query and based on themutation table, at least one corresponding other field of the secondtable has not been modified; and providing, based on the determinationthe corresponding field of the second table has not been modified, datafrom the at least one field of the first table in response to the thirdquery.
 10. The computer-implemented method of claim 8, wherein the firsttable becomes immutable during the live migration.
 11. Thecomputer-implemented method of claim 8, wherein modifying the firsttable includes at least one of modifying data, inserting data, ordeleting data in the first table.
 12. The computer-implemented method ofclaim 8, wherein updating the mutation table further comprises:determining a row in the second table to which the modification wasperformed; and updating the mutation table to indicate that the row hasbeen modified.
 13. The computer-implemented method of claim 12, whereinthe mutation table indicates the requested modification of the firsttable by setting a Boolean value for a row of the mutation tablecorresponding to the first row the first table.
 14. Thecomputer-implemented method of claim 8, wherein the first query requeststo delete at least one row in the first table, wherein the instructionsfurther cause the system to perform: receiving a third query foraccessing the at least one row during the live migration of the firsttable to the second table of the second database schema; determining, inresponse to receiving the second query and based on the mutation table,at least one corresponding row of the second table has been deleted;determining that the row has been deleted from the second table; andproviding a null value in response to the third query.
 15. Anon-transitory computer readable medium comprising instructions that,when executed, cause one or more processors to perform: receiving afirst query requesting a modification of at least one field in the firsttable of a first database schema during a live migration of the firsttable to a second table of a second database schema, the first tablestoring live data; modifying, in response to receiving the first query,at least one corresponding field of the second table based on the firstquery; updating a mutation table based on the modification, wherein themutation table tracks one or more modifications to the second table;receiving a second query for accessing the at least one field in thefirst table during the live migration of the first table to the secondtable of the second database schema; and determining, in response toreceiving the second query and based on the mutation table, thecorresponding field of the second table has been modified; providing,based on the determination the corresponding field of the second tablehas been modified, data from the at least one corresponding field of thesecond table in response to the second query.
 16. The non-transitorycomputer readable medium of claim 15, wherein the instructions furthercause the system to perform: receiving a third query for accessing atleast one other field of the first table during the live migration ofthe first table to the second table of the second database schema;determining, in response to receiving the third query and based on themutation table, at least one corresponding other field of the secondtable has not been modified; and providing, based on the determinationthe corresponding field of the second table has not been modified, datafrom the at least one field of the first table in response to the thirdquery.
 17. The non-transitory computer readable medium of claim 15,wherein the first table becomes immutable during the live migration. 18.The non-transitory computer readable medium of claim 15, whereinmodifying the first table includes at least one of modifying data,inserting data, or deleting data in the first table.
 19. Thenon-transitory computer readable medium of claim 15, wherein updatingthe mutation table further comprises: determining a row in the secondtable to which the modification was performed; and updating the mutationtable to indicate that the row has been modified.
 20. The non-transitorycomputer readable medium of claim 19, wherein the mutation tableindicates the requested modification of the first table by setting aBoolean value for a row of the mutation table corresponding to the firstrow the first table.